<?php


namespace App\Logic;

use App\Exceptions\ApiException;
use App\Models\OptionModel;
use App\Models\QuestionModel;
use App\Utils\Singleton;
use Illuminate\Http\Request;
use Illuminate\Http\Response;


class OptionLogic
{
    use Singleton;

    /**
     * 展示题目选项
     * @param $question_id
     * @return
     */
    public function get(Request $request) {
        $question_id = $request->input('question_id');
        $result = OptionModel::getInstance()->getList(["option_id","option_content"],['question_id' => $question_id]);
        $result = objectToArray($result);
        return $result;
    }
}
